package home

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

type UserInfo struct {
	Id   int
	Name string
	Age  int
	Addr string
}

// User 用户列表
func User(ctx *gin.Context) {
	name := "jack"
	ctx.HTML(http.StatusOK, "user/index.html", name)
}

// UserInfoStruct 结构体渲染
func UserInfoStruct(ctx *gin.Context) {
	userInfo := UserInfo{
		Id: 1, Name: "jack", Age: 18, Addr: "好地方",
	}
	ctx.HTML(http.StatusOK, "user/user_info.html", userInfo)
}
